package com.bootdo.hotel.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.hotel.dao.HotelRoomFloorDao;
import com.bootdo.hotel.domain.HotelRoomFloor;
import com.bootdo.hotel.service.HotelRoomFloorService;



@Service
public class HotelRoomFloorServiceImpl implements HotelRoomFloorService {
	@Autowired
	private HotelRoomFloorDao hotelRoomFloorDao;
	
	@Override
	public HotelRoomFloor get(Long id){
		return hotelRoomFloorDao.get(id);
	}
	
	@Override
	public List<HotelRoomFloor> list(Map<String, Object> map){
		return hotelRoomFloorDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return hotelRoomFloorDao.count(map);
	}
	
	@Override
	public int save(HotelRoomFloor hotelRoomFloor){
	
		if(hotelRoomFloor.getId() != null) {
			return hotelRoomFloorDao.update(hotelRoomFloor);
		}else {
			return hotelRoomFloorDao.save(hotelRoomFloor);
		}		
	
		
	}
	
	@Override
	public int update(HotelRoomFloor hotelRoomFloor){
		return hotelRoomFloorDao.update(hotelRoomFloor);
	}
	
	@Override
	public int remove(Long id){
		return hotelRoomFloorDao.remove(id);
	}
	
	@Override
	public int batchRemove(Long[] ids){
		return hotelRoomFloorDao.batchRemove(ids);
	}
	
}
